﻿using STF.Blog.Dtos;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace STF.Blog.IService
{
    /// <summary>
    /// 博客表
    /// </summary>
    public interface IBlogService
    {
        public Task<int> AddBlogAsync(string title,string content,DateTime publishTime,int stateCode,int like,int trample,int typeId,int fbxsId,int leveId,int uid,int coverId);
        public Task<int> UpdateBlogAsync(int id, string title, string content, DateTime publishTime, int stateCode, int like, int trample, int typeId, int fbxsId, int leveId, int uid, int coverId);
        public Task<int> PutTrashAsync(int id);
        public Task<int> RestoreAsync(int id);
        public Task<int> DeleteBlogAsync(int id);
        public Task<List<BlogDto>> GetAllBlogAsync(int deleteId = 1,int stateCode = 2);
        public Task<List<BlogDto>> GetByNameAsync(string title, int deleteId = 1,int stateCode = 1);
        public Task<BlogDto> GetByIdAsync(int id);
        //public Task<List<BlogDto>> GetBlogStateAsync(int stateCode);
        public Task<int> UpdateStateCode(int stateId, int stateCode);

        public Task<List<BlogDto>> GetByIdListAsync(int id,int deleteId = 1,int stateCode = 2);
        public Task<int> GetByBidAsync(int userId);

        public Task<List<BlogDto>> GetByDateAsync(int deleteId = 1, int stateCode = 2);
        public Task<List<BlogDto>> GetByLikeAsync(int deleteId = 1, int stateCode = 2);
        public Task<List<BlogDto>> GetByUidListAsync(int uid);
    }
}
